package com.smartleanx.module.hrm.convert.payroll;

import com.smartleanx.module.hrm.dal.dataobject.payroll.PayrollDetailDO;
import com.smartleanx.module.hrm.service.payroll.bo.PayrollDetailSaveBO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

@Mapper
public interface PayrollDetailConvert {

    PayrollDetailConvert INSTANCE = Mappers.getMapper(PayrollDetailConvert.class);

    @Mapping(target = "employeeId", expression = "java(Long.valueOf(saveBO.getEmployeeId().toString()))")
    PayrollDetailDO convertDO(PayrollDetailSaveBO saveBO);
}
